<template>
    <div class='register'>
        <yd-tab>
            <yd-tab-panel label='公司主体注册'>
                <yd-cell-group>
                    <yd-cell-item class='register-username'>
                        <span slot='left'>用&nbsp;&nbsp;户&nbsp;&nbsp;名：</span>
                        <yd-input slot='right' required v-model='formInfo.PartnerAccount' max='20' placeholder='请输入用户名'></yd-input>
                    </yd-cell-item>
                    <yd-cell-item class='register-password'>
                        <span slot='left'>密&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;码：</span>
                        <yd-input slot='right' type='password' v-model='formInfo.PartnerPwd' placeholder='请输入密码'></yd-input>
                    </yd-cell-item>
                    <yd-cell-item class='register-password'>
                        <span slot='left'>确认密码：</span>
                        <yd-input slot='right' type='password' v-model='formInfo.PartnerPwd2' placeholder='请重新输入密码'></yd-input>
                    </yd-cell-item>
                    <yd-cell-item class='register-PartnerName'>
                        <span slot='left'>联&nbsp;&nbsp;系&nbsp;&nbsp;人：</span>
                        <yd-input slot='right' required v-model='formInfo.PartnerName' max='20' placeholder='请输入联系人姓名'></yd-input>
                    </yd-cell-item>
                    <yd-cell-item class='register-PartnerTel'>
                        <span slot='left'>联系方式：</span>
                        <yd-input slot='right' required v-model='formInfo.PartnerTel' max='11' placeholder='请输入手机号码'></yd-input>
                    </yd-cell-item>
                    <yd-cell-item class='register-PartnerCreditCode'>
                        <span slot='left'>统一社会信用代码：</span>
                        <yd-input slot='right' required v-model='formInfo.PartnerCreditCode' max='20' placeholder='请输入社会信用代码'></yd-input>
                    </yd-cell-item>
                </yd-cell-group>
                <div class='Photos' style='width:92%'>
                    <span class='gs'>公司名片：</span>
                    <el-upload action='http://wx-chiming.subei88.com/Common/UploadPhoto?type=PartnerBusiness' list-type='picture-card' v-bind:limit='2'>
                        <i class='el-icon-plus'></i>
                    </el-upload>
                    <span class='gs'>身份证正面照片：</span>
                    <el-upload action='http://wx-chiming.subei88.com/Common/UploadPhoto?type=PartnerBusiness' list-type='picture-card' v-bind:limit='2'>
                        <i class='el-icon-plus'></i>
                    </el-upload>
                    <span class='gs'>身份证反面照片：</span>
                    <el-upload action='http://wx-chiming.subei88.com/Common/UploadPhoto?type=PartnerBusiness' list-type='picture-card' v-bind:limit='2'>
                        <i class='el-icon-plus'></i>
                    </el-upload>
                    <span class='gs'>营业执照正面：</span>
                    <el-upload action='http://wx-chiming.subei88.com/Common/UploadPhoto?type=PartnerBusiness' list-type='picture-card' v-bind:limit='2'>
                        <i class='el-icon-plus'></i>
                    </el-upload>
                    <span class='gs'>营业执照：</span>
                    <el-upload action='http://wx-chiming.subei88.com/Common/UploadPhoto?type=PartnerBusiness' list-type='picture-card' v-bind:limit='2'>
                        <i class='el-icon-plus'></i>
                    </el-upload>
                </div>
                <div class='register-box'>
                    <el-button class='register-btn' @click='register1()'>点击注册</el-button>
                    <!-- <yd-button size='large' type='primary'>点击注册</yd-button> -->
                </div>
            </yd-tab-panel>
            <yd-tab-panel label='个人主体注册'>
                <yd-cell-group>
                    <yd-cell-item class='register-username'>
                        <span slot='left'>用&nbsp;&nbsp;户&nbsp;&nbsp;名：</span>
                        <yd-input slot='right' required v-model='formInfo.PartnerAccount' max='20' placeholder='请输入用户名'></yd-input>
                    </yd-cell-item>
                    <yd-cell-item class='register-password'>
                        <span slot='left'>密&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;码：</span>
                        <yd-input slot='right' type='password' v-model='formInfo.PartnerPwd' placeholder='请输入密码'></yd-input>
                    </yd-cell-item>
                    <yd-cell-item class='register-password2'>
                        <span slot='left'>确认密码：</span>
                        <yd-input slot='right' type='password' v-model='formInfo.PartnerPwd2' placeholder='请重新输入密码'></yd-input>
                    </yd-cell-item>
                    <yd-cell-item class='register-PartnerName'>
                        <span slot='left'>联&nbsp;&nbsp;系&nbsp;&nbsp;人：</span>
                        <yd-input slot='right' required v-model='formInfo.PartnerName' max='20' placeholder='请输入联系人姓名'></yd-input>
                    </yd-cell-item>
                    <!-- <yd-cell-item class='register-PartnerTe'>
                        <span slot='left'>联系方式：</span>
                        <yd-input slot='right' required v-model='formInfo.PartnerTel' max='11' placeholder='请输入手机号'></yd-input>
                    </yd-cell-item> -->
                    <yd-cell-item class='register-PartnerTel'>
                        <span slot='left'>联系方式：</span>
                        <yd-input slot='right' required v-model='formInfo.PartnerTel' max='11' placeholder='请输入手机号码'></yd-input>
                    </yd-cell-item>
                    <yd-cell-item class='register-IdCard'>
                        <span slot='left'>身份证号码：</span>
                        <yd-input slot='right' required v-model='formInfo.PartnerIdCard' max='20' placeholder='请输入身份证号码'></yd-input>
                    </yd-cell-item>
                </yd-cell-group>
                <div class='Photos' style='width:92%'>
                    <span class='gs'>身份证正面照片：</span>
                    <el-upload action='http://wx-chiming.subei88.com/Common/UploadPhoto?type=PartnerBusiness' list-type='picture-card' v-bind:limit='2'>
                        <i class='el-icon-plus'></i>
                    </el-upload>
                    <span class='gs'>身份证反面照片：</span>
                    <el-upload action='http://wx-chiming.subei88.com/Common/UploadPhoto?type=PartnerBusiness' list-type='picture-card' v-bind:limit='2'>
                        <i class='el-icon-plus'></i>
                    </el-upload>
                    <span class='gs'>征信报告：</span>
                    <el-upload action='http://wx-chiming.subei88.com/Common/UploadPhoto?type=PartnerBusiness' list-type='picture-card' v-bind:limit='2'>
                        <i class='el-icon-plus'></i>
                    </el-upload>
                </div>
                <div class='register-box'>
                    <!-- <yd-button size='large' type='primary' class='register-btn'>点击注册</yd-button> -->
                    <el-button @click='open2' class='register-btn'>点击注册</el-button>
                </div>
            </yd-tab-panel>
        </yd-tab>
    </div>
</template>
<script>
import axios from "axios";
export default {
    data() {
        return {
            formInfo: {
                PartnerName: "", //联系人名字
                PartnerAccount: "", //账号
                PartnerPwd: "", //密码
                PartnerPwd2: "", // 第二次输入的密码
                PartnerTel: "", //电话号码
                PartnerType: '', //传送的数据类型 id
                PartnerCreditCode: "", //信用代码
                PartnerCompanyPhoto: "", //公司名片图片地址
                PartnerCompanyPhotoPath: "",
                PartnerIDCard: "",  //身份证号码
                PartnerLegalPhoto1:"",  // 公司法人身份证照片
                PartnerLegalPhoto2:"",  // 公司法人身份证照片
                PartnerIDPhoto1:"",  //身份证照片 正
                PartnerIDPhoto2:"" , //身份证照片 正
                PartnerBusinessPhoto1:"",  //营业执照正面：
                PartnerBusinessPhoto2:"", //营业执照反面：
                PartnerCreditReport:""  //信征报告
            }
        };
    },
    methods: {
        // open1() {
            //   this.$alert('注册成功', '注册', {
            //     confirmButtonText: '确定'
            //   })
            // if (this.formInfo.PartnerAccount == '') {
            //     this.$alert('请输入用户名！', '提醒', {
            //         confirmButtonText: '确定'
            //     });
            // } else if (this.formInfo.PartnerPwd == '') {
            //     this.$alert('请输入密码！', '提醒', {
            //         confirmButtonText: '确定'
            //     });
            // } else if (this.formInfo.PartnerPwd2 == '') {
            //     this.$alert('请重新输入密码！', '提醒', {
            //         confirmButtonText: '确定'
            //     });
            // } else if (this.formInfo.PartnerPwd2 !== this.formInfo.PartnerPwd) {
            //     this.$alert('两次密码输入不一致，请重新输入！', '提醒', {
            //         confirmButtonText: '确定'
            //     });
            // } else if (this.formInfo.PartnerName == '') {
            //     this.$alert('请输入联系人姓名！', '提醒', {
            //         confirmButtonText: '确定'
            //     });
            // } else if (this.formInfo.PartnerTel == '') {
            //     this.$alert('请输入联系人电话', '提醒', {
            //         confirmButtonText: '确定'
            //     });
            // } else if (this.formInfo.PartnerCreditCode == '') {
            //     this.$alert('请输入统一社会信用代码', '提醒', {
            //         confirmButtonText: '确定'
            //     });
            // } else if (this.formInfo !== '') {
            //     this.$alert(
            //         '注册成功',
            //         '注册',
            //         {
            //             confirmButtonText: '确定'
            //         },
            //         5000
            //     );
            //     console.log('成功执行注册操作');
            //     window.location.href = '/login';
            // }
        // },
        register1(){
            
        }
        // open2() {
        //     if (this.formInfo.PartnerAccount == '') {
        //         this.$alert('请输入用户名！', '提醒', {
        //             confirmButtonText: '确定'
        //         });
        //     } else if (this.formInfo.PartnerPwd == '') {
        //         this.$alert('请输入密码！', '提醒', {
        //             confirmButtonText: '确定'
        //         });
        //     } else if (this.formInfo.PartnerPwd2 == '') {
        //         this.$alert('请重新输入密码！', '提醒', {
        //             confirmButtonText: '确定'
        //         });
        //     } else if (
        //         this.formInfo.PartnerPwd2 !== this.formInfo.PartnerPwd
        //     ) {
        //         this.$alert('两次密码输入不一致，请重新输入！', '提醒', {
        //             confirmButtonText: '确定'
        //         });
        //     } else if (this.formInfo.PartnerName == '') {
        //         this.$alert('请输入联系人姓名！', '提醒', {
        //             confirmButtonText: '确定'
        //         });
        //     } else if (this.formInfo.PartnerTel == '') {
        //         this.$alert('请输入联系人电话', '提醒', {
        //             confirmButtonText: '确定'
        //         });
        //     } else if (this.formInfo.PartnerIdCard == '') {
        //         this.$alert('请输入身份证号码', '提醒', {
        //             confirmButtonText: '确定'
        //         });
        //     } else if (this.formInfo !== '') {
        //         this.$alert(
        //             '注册成功',
        //             '注册',
        //             {
        //                 confirmButtonText: '确定'
        //             },
        //             5000
        //         );
        //         console.log('成功执行注册操作');
        //         window.location.href = '/login';
        //     }
        // }
    }
};
</script>
<style>
.register {
    width: 100%;
}
.register .yd-cell-item {
    /* width: 92%; */
    margin: 0 auto;
    height: 1rem;
    font-size: 0.4rem;
}
.register .yd-tab-box a {
    height: 1rem;
    line-height: 1rem;
    font-size: 0.32rem;
}
.yd-cell-left {
    padding-left: 0;
}
.yd-cell-left,
.yd-cell-right {
    font-size: 0.3rem;
}
.yd-cell-right .yd-input input,
.yd-cell-left .yd-input input {
    font-size: 0.3rem;
}
.yd-input-warn:after,
.yd-input-success:after,
.yd-input-password:after {
    /* padding-right: 0.4rem; */
    font-size: 0.4rem;
}
.gs {
    margin: 0.4rem 0;
    display: block;
    font-size: 0.3rem;
}
.register .el-upload {
    width: 2rem;
    height: 2rem;
    position: relative;
}
.register .el-upload--picture-card i {
    font-size: 0.5rem;
    line-height: 2rem;
    margin: 0 auto;
    text-align: center;
    position: absolute;
    left: 38%;
}
.register .Photos {
    widows: 92%;
    margin: 0 auto;
}
.register .el-upload-list__item-actions,
.register .el-upload-list__item {
    width: 2rem;
    height: 2rem;
}
.register .el-upload-list__item-actions img {
    width: 100%;
}
.register-btn {
    margin: 0.35rem auto;
    /* height: 2.1rem; */
    background: #3e92f5;
    color: white;
    display: block;
    /* border-radius: 0.4rem; */
    width: 40%;
    overflow: hidden;
}
.register .el-button:focus,
.el-button:hover {
    color: white;
    background-color: #3e92f5;
}
.el-message-box {
    width: 80%;
    height: 3rem;
    margin: 0 auto;
    font-size: 0.35rem;
}
</style>